home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2925 < prev    next >
Encoding:
Text File  |  1996-08-06  |  933 b   |  36 lines

  1. Path: news.drexel.edu!dunx1!st918h5w
  2. From: st918h5w@dunx1.ocs.drexel.edu (Jonathan Juniman)
  3. Newsgroups: comp.lang.c++
  4. Subject: maddening constructor problem
  5. Date: 20 Jan 1996 15:50:31 GMT
  6. Organization: Drexel University
  7. Message-ID: <4dr307$4so@noc2.drexel.edu>
  8. NNTP-Posting-Host: dunx1.ocs.drexel.edu
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. Maddening constructor problem:
  12.  
  13. MYCLASS.H
  14. class MyClass
  15.     {
  16.     public:
  17.     MyClass(unsigned int i, insigned int j, double* pK);
  18.     // etc
  19.     }
  20.  
  21. MYCLASS.CPP
  22. MyClass::MyClass(unsigned int i, unsigned int j, double* pK)
  23.     {
  24.     // constructor code here
  25.     }
  26.  
  27. Visual C++ bites me on MYCLASS.CPP, saying "constructor not allowed
  28. a return type".  What's the problem?  The constructor doesn't _have_
  29. a return type. Please respond by e-mail.
  30.  
  31. BTW, I know I've been posting a s**tload of questions.  I'll try to
  32. help others as well, and thanks to all the people who have takenn the time to
  33. help me.
  34.                     Peace,
  35.                     Jon
  36.